﻿<%@ WebHandler Language="C#" Class="save_01" %>

using System;
using System.Web;
using TSqlServer;

public class save_01 : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {

        string leftchar = context.Request["lc"].ToString();
        string namelist = "";
        string sSql = "select distinct company from t_linkman where company like '" + leftchar + "%' order by company";
        TSqlDBReader myReader = new TSqlDBReader(sSql);
        while (myReader.FDataReader.Read())
        {
            namelist += myReader.FDataReader.GetValue(0).ToString() + ";";
        }
        myReader.Free();
        
        context.Response.ContentType = "text/plain";
        context.Response.Write(namelist);
        context.Response.End();
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}